package ca.llsutherland.nfl.court;

import ca.llsutherland.squash.BaseValidator;
import ca.llsutherland.squash.domain.Court;
import ca.llsutherland.squash.gym.GymsValidator;

public class CourtsValidator extends BaseValidator {

    public static void validate(Court expectedCourt, Court actualCourt) {
        assertValidDomainObject("Court should not be null and should have a not null id", actualCourt);
        assertValidNamedDomainObject("Court name should be equal", expectedCourt, actualCourt);
        GymsValidator.validate(expectedCourt.getGym(), actualCourt.getGym());
        CourtStylesValidator.validate(expectedCourt.getCourtStyle(), actualCourt.getCourtStyle());
        assertEquals("Locations should be the same", expectedCourt.getLocation(), actualCourt.getLocation());
        assertEquals("Special Notes should be the same", expectedCourt.getSpecialNotes(), actualCourt.getSpecialNotes());
    }

}
